A R Version 1.5 W. McCloud November 10, 1988 ---------------------------------------------------------------------------- WHAT IS AR?: AR is a program that allows you to run other programs which are stored inside of a .ARC (PKXARC/PKARC) file. AR allows you to place programs in an archive (saving valuable disk space) and run them at will. This program differs from other such programs in the following ways: - AR allows you to specify a number of files to be De-ARC'd when running. This is IMPORTANT for those programs which require associated files (overlays, data files, config files, etc) in addition to the executable file. - AR also allows you to specify where you want the files De-ARC'd to (I use a RAM disk). - AR also allows you to execute a batch file to control how the De-ARC'd program runs. (I run an AT clone at 12 MHz and when running game programs, I often execute TSR's to slow the machine or activate other enhancements along with running the program). - AR also will give you a listing of the programs which you have set up for the above plus will give you a listing of all files contained in the archive file. WHAT YOU NEED: To run AR, you need the following: - PKXARC located in your path. - An .ARC file containing the programs (and associated files) that you wish to run from archive. - Enough room on a drive (Floppy, Hard, or RAM-Disk) to De-Arc the program and files which you which to run. - A archive configuration file located in the same directory as your .ARC file (see CONFIGURATION FILE below). CONFIGURATION FILE: The archive configuration file contains the path that you wish to De-Arc to, a listing of KEYWORDS which are the same name as the executable file that you wish to run (less extension), the files that you wish to De-ARC (if more than one) and the batch file commands (if any) that you wish to execute along with the above. The configuration files has the same name as the archive file with an extension of ".XXX" Example: Suppose you have an archive file names "GAMES.ARC". Create an ASCII text file called "GAMES.XXX" and locate it in the same subdirectory as "GAMES.ARC". Details: The first line of the configuration file starts with "+" and is followed by the drive\path that you wish to De-ARC to. (i.e. You want to De-ARC to drive E: in the root directory so the first line of your file is "+E:" The next section of the configuration file is specific to each program that you wish to run and always starts with a line consisting of "---". The next line of this section is CAPITALIZED and contains the KEYWORD for running your program (This is identical to the name of the executable file without extension). (i.e. you want to run a program called INVADERS.COM, so this line is "INVADERS". The next line contains the file or files that you wish to De-Arc (including extension). Unless you are going to run from a batch file (see below), the first file specified must be the executable one (A good practice anyway). The configuration file always ends with two lines of "---". Lets see what the configuration file looks like in the above example. File is "GAMES.XXX": +E: --- INVADERS invaders.com --- --- You can add other programs as follows: +E: --- INVADERS invaders.com --- next program section --- next program section . . . --- last program section --- --- Suppose INVADERS.COM needs another file called INVADERS.DAT to run properly. In this case you need to two files to be De-Arc'd. +E: --- INVADERS invaders.com invaders.dat --- --- Now lets get fancy.... Now suppose that in order to run invaders properly, you also want to run a program called SLOW which will slow your machine down (in the example, the syntax for SLOW is SLOW ON to slow down and SLOW OFF to speed back up). In this case you would want to execute a batch file containing the slow commands prior to executing INVADERS.COM. All batch commands in the configuration file start with "*". Thus, your file would now look like the following: +E: --- INVADERS invaders.com invaders.dat *echo off *slow on *invaders *slow off --- --- In the above, AR would search the configuration file for the keyword INVADERS, De-Arc invaders.com and invaders.dat to drive E:, and then execute a batch file (called TEMP.BAT) containing the commands starting with "*" in the above. SYNTAX: AR is executed with the following choice of syntax: SYNTAX 1: AR Will give you built-in help on syntax and structure of the configuration file. SYNTAX 2: AR drive-path\archivefile\keyword where: "drive-path" is the location of your archive file and configuration file, and "archivefile" is the name (less extension) of your archive "keyword" is the CAPITALIZED name of the executable file (less extension) In example, if you have an archive file called GAMES.ARC and corresponding configuration file called GAMES.XXX located on drive C: in the subdirectory \MYGAMES and you want to run INVADERS.COM then AR would be called: AR C:\MYGAMES\GAMES\INVADERS SYNTAX 3: AR drive-path\archivefile\action where: "drive-path" is the location of your archive file and configuration file, and "archivefile" is the name (less extension) of your archive where: "action" is one of the following: L or LISTING: is the KEYWORD used to show you all KEYWORDS contained in your configuration file. AL or ARCLIST: is the KEYWORD used to show you a listing of all files contained in your .ARC file ALS or ARCLIST-S: is a KEYWORD used to show you a listing of all files contained in your .ARC file but requires you to have the program SD.COM in your path. ALOS or ARCLIST-OS: is the same as ARCLIST-S but will output the list of all files in your .ARC file to a file called ARCLIST. I know this sounds confusing but it is actually quite easy once you catch on. Here's another example: Background: I have an archive file called MISC.ARC in directory C:\MISCPROG\ In this archive I have the following: A program called DDIR.EXE which can run all alone. A program called CHKDK.COM which needs the file CHK.DAT (also contained in the archive MISC.ARC) to run. A program called EDIT.COM which needs file EDIT.DAT to run (also in the archive MISC.ARC) and for which I would like to execute a program called SETUP.EXE prior to running it. I would like to run all archived programs from "D:\TEMP" In the case I would create a configuration file called MISC.XXX (also located in directory C:\MISCPROG) containing the following: +D:\TEMP --- DDIR ddir.exe --- CHKDK {Need two files, so KEYWORD plus both filenames) chkdk.com {Executable file listed first} chk.dat --- EDIT (Need two files, so KEYWORD plus filenames) edit.com edit.dat *echo off (These three lines will be placed in a batch *setup file called D:\TEMP\TEMP.BAT and then executed) *edit --- --- To run EDIT.COM, type "AR C:\MISCPROG\MISC\EDIT" To run CHKDK.COM, type "AR C:\MISCPROG\MISC\CHKDK" To get a listing of all programs contained in MISC.XXX, type "AR C:\MISCPROG\MISC\LISTING" or "AR C:\MISCPROG\MISC\L" To get a listing of all programs contained in "MISC.ARC" type "AR C:\MISCPROG\MISC\ARCLIST" or "AR C:\MISCPROG\MISC\ARCLIST-S" or "AR C:\MISCPROG\MISC\ARCLIST-OS". You can substitue shorter keywords (abbreviations) if you like. WHEN ALL DONE: As AR executes, it will change to the directory\path specified in the first line of the configuration file, extract all files associated with the KEYWORD from your archive into this directory, execute either the executable program specified by the first file listed after the KEYWORD or create and execute TEMP.BAT (if any batch commands are associated with the KEYWORD) and when all done, erase all files created. PROGRAM STATUS: This program is released into the public domain. You are free to use and distribute this as you like. I, however, take no liability for ANYTHING that happens when you use it. I think you'll like AR, it saves a lot of expensive diskspace and doesn't slow down running a program very much (HINT: Keep your .ARCs reasonable in size since most of the time overhead associated with AR is wrapped up in searching the configuration file and archive (the bigger the .ARC is, the longer this takes)). Have fun!!! REVISION HISTORY: Version 1.5: Corrected documentation to reflect the fact that the first file specified after a KEYWORD in the configuration file must be the executable file. Also added abbreviations for LISTING, ARCLIST, etc. Version 1.4: Added built-in help function by typing in "AR" only. Also added additional KEYWORDS for listing contents of .ARC file. Corrected bug in previous versions that prevented proper use of sub-directories in the location (via configuration file) to De-Arc to. Version 1.3: Not released, interm version. Added ability to work with shell programs which padded the command line with extra space characters (ASCII=32) to the right of text. Fixed a major "bug" in the documentation that incorrectly stated that if you wanted to De-Arc a single program, you only needed to list the KEYWORD in the configuration file (NOT SO, I'M SORRY TO SAY. You need both the keyword and the name of the program.ext to De-Arc). Version 1.2: First release to Public Domain. Bill McCloud November 10, 1988